package com.example.adapter4;

/**
 * @version 1.0.0
 * @className: Phone
 * @description:
 * @author: rosszhang
 * @date: 2022/5/13 16:45
 */
public class Phone {
    public void charging(IVoltage5V iVoltage5V){
        if (iVoltage5V.output5V()==5){
            System.out.println("电压5V,可以充电");
        }else if (iVoltage5V.output5V()>5){
            System.out.println("电压大于5V,不能充电");
        }
    }
}
